seaborn hue order

61

seaborn hue order -

import seaborn as sns

titanic = sns.load_dataset("titanic")
hue_order = ['Third', 'Second', 'First']
sns.catplot(x="sex", y="survived", hue="class", data=titanic, 
			hue_order=hue_order, kind="bar")

seaborn orient -

>>> import seaborn as sns
>>> sns.set_theme(style="whitegrid")
>>> tips = sns.load_dataset("tips")
>>> ax = sns.boxplot(x=tips["total_bill"])

Comments

Submit
0 Comments